import request from "@/utils/request"

export interface QueryMyExportListParams extends PaginationParams {
  isRead?: string
}
export enum MyExportStatus {
  未读 = 0,
  已读 = 1,
}
export enum MyExportType {
  充电订单 = 1,
  占用订单 = 2,
  充电站 = 3,
  设备 = 4,
  枪 = 5,
  充电订单结算明细 = 12,
  占位订单结算明细 = 11
}
export interface MyExport {
  /** 类型 */
  type: MyExportType
  /** 文件标题 */
  fileName: string
  /** 下载地址 */
  url: string
  /** 是否已读 */
  isRead: MyExportStatus
  /** 导出时间 */
  modifyTime: number
  id: number
}
export async function queryMyExportList(params: QueryMyExportListParams) {
  return request<MyExport[]>('/app/manager/exportLog/list', {
    method: 'GET',
    data: params,
  })
}

export async function doMyExport(params: {id: number}) {
  return request<boolean>('/app/manager/exportLog/read', {
    method: 'GET',
    data: params,
  })
}